package com.qf.zyh.services.impl;

import com.qf.zyh.dao.UserMapper;
import com.qf.zyh.entity.Users;
import com.qf.zyh.services.UserSer;

public class UserSerImpl implements UserSer {
    private UserMapper um;

    public UserMapper getUm() {
        return um;
    }

    public void setUm(UserMapper um) {
        this.um = um;
    }

    @Override
    public Users getname(String name,String pwd) {
        System.out.println(name+"name1");
        Users getname = um.getname(name);
        System.out.println(getname+"name2");
        if (getname.getPassword().equals(pwd)) {
            return getname;
        }
        return null;
    }

    @Override
    public int insuser(Users users) {
        return um.insuser(users);
    }
}
